﻿<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@page pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html>
<head>
	<link rel="stylesheet" type="text/css" media="screen" href="resources/css/style.css" />
	<title>Login</title>
</head>

<body>
	Language : <a href="?lang=en">English</a>|<a href="?lang=ru">Russian</a>
	Current Locale: ${pageContext.response.locale}
	<p>Request Locale: <%= request.getLocale() %></p>
	<form class="login-form" action="j_spring_security_check" method="post">
		<fieldset>
			<legend>Login Here = Логин = <spring:message code="login.login"/></legend>

			<p>
				<label for="j_username">Username</label>: <input id="j_username"
					name="j_username" size="20" maxlength="50" type="text" />
			</p>

			<p>
				<label for="j_password">Password</label>: <input id="j_password"
					name="j_password" size="20" maxlength="50" type="password" />
			</p>

			<p>
				<input type="submit" value="Login" />
			</p>
		</fieldset>
	</form>
	<p class="message">${message}</p>
	<c:if test="${not empty param.failure}">
		<div class="message">${sessionScope["SPRING_SECURITY_LAST_EXCEPTION"].message}
		</div>
	</c:if>
</body>
</html>